package com.leadingsoft.pwxk.converter;

import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

import com.leadingsoft.common.converter.AbstractConverter;
import com.leadingsoft.pwxk.dto.AnnouncementDto;
import com.leadingsoft.pwxk.model.Announcement;

@Component
public class AnnouncementConverter extends AbstractConverter<Announcement, AnnouncementDto> {

	@Override
	protected AnnouncementDto toDtoActual(Announcement model) {
		AnnouncementDto dto = new AnnouncementDto();
		BeanUtils.copyProperties(model, dto);
		return dto;
	}

	@Override
	public void copyProperties(Announcement model, AnnouncementDto dto) {
		BeanUtils.copyProperties(dto, model);
	}

}
